<?php
	session_start();
	error_reporting(E_ERROR | E_WARNING | E_PARSE);
	include('conn.php');
	//生成时间戳
	$time = time();
	//拼凑sql语句。
	$sql = "insert into data values (null,'{$_SESSION['user_name']}',null,'{$_POST['write']}',$time)";
	//执行sql语句
	$data = mysql_query($sql,$conn);
	//跳转回主页
	header("Location:index.php");
?>